import React, { Component } from 'react';
import {
    View,
    Text,
} from 'react-native';
import CourseItem from "./CourseItem";
import styles from "./styles";
export default class CourseList extends Component {

    constructor(props) {
        super(props);
        this.state = {
            
        };
    }
    
    render() {
        const {coursesData, navigation} = this.props;
        return (
            <View style={styles.courseBoard}>
                
                {
                    coursesData.map((item,index) => {
                        return (
                            <CourseItem
                                data={item}
                                navigation={navigation}
                                key={item.id}
                                styles={styles}
                                index={index}
                            />
                        )
                    })
                }
            </View>
        );
    }
    
}
